import { Dimensions } from "react-native"

const deviceWidthDp = Dimensions.get("window").width

export function px2dp(uiElePx, uiWidthPx = 375) {
  if (typeof uiElePx === "string") parseFloat(uiElePx)
  return (uiElePx * deviceWidthDp) / uiWidthPx
}
